home *** CD-ROM | disk | FTP | other *** search
/ Dynamic HTML Construction Kit / Dynamic HTML Construction Kit.iso / source_code / dhtmlunl / dhtml.exe / CD Content / Chap15 / dun15_11.txt < prev    next >
Encoding:
Text File  |  1997-12-18  |  2.0 KB  |  62 lines

  1. <HTML>
  2.  
  3. <HEAD>
  4.  
  5.   <TITLE>Exposing Style Sheets in IE4</TITLE>
  6.  
  7.  
  8.  
  9.   <STYLE>
  10.  
  11.     DT               { padding-top: 12; }
  12.  
  13.     FONT             { font-family: arial, helvetica, sans-serif; }
  14.  
  15.     .layer           { position: absolute; }
  16.  
  17.     #banner          { background-color: yellow; }
  18.  
  19.   </STYLE>
  20.  
  21. </HEAD>
  22.  
  23.  
  24.  
  25. <BODY ID=body STYLE="background-color: white; font-size: 12pt;">
  26.  
  27.   <BLOCKQUOTE>
  28.  
  29.  
  30.  
  31.   <P><IMG ID=arrow SRC="arrow.gif" STYLE="border: 0;">
  32.  
  33.  
  34.  
  35.   <DIV ID=banner CLASS=layer STYLE="color: blue; left: 72; top: 15;">
  36.  
  37.     <FONT CLASS=pageTitle SIZE=+2>
  38.  
  39.       Exposing Style Sheets in IE4
  40.  
  41.     </FONT>
  42.  
  43.   </DIV>
  44.  
  45.  
  46.  
  47.   <BR><BR>
  48.  
  49.   Each page element object contains a <TT>style</TT> object
  50.  
  51.   that reflects the inline styles applied to that element object.
  52.  
  53.   The following are the style properties reflected into style
  54.  
  55.   objects for some of the elements on this page:</P>
  56.  
  57.  
  58.  
  59.   <BLOCKQUOTE><DL>
  60.  
  61.   <SCRIPT>
  62.  
  63.     document.writeln("<DT><B>BODY</B></DT>");
  64.  
  65.     document.writeln("<DD><B>background-color:</B> ");
  66.  
  67.     document.writeln(document.all.body.style.backgroundColor);
  68.  
  69.     document.writeln("</DD>");
  70.  
  71.     document.writeln("<DD><B>font-size:</B> ");
  72.  
  73.     document.writeln(document.all.body.style.fontSize);
  74.  
  75.     document.writeln("</DD>");
  76.  
  77.  
  78.  
  79.     document.writeln("<DT><B>DIV</B></DT>");
  80.  
  81.     document.writeln("<DD><B>color:</B> ");
  82.  
  83.     document.writeln(document.all.banner.style.color);
  84.  
  85.     document.writeln("</DD>");
  86.  
  87.     document.writeln("<DD><B>left:</B> ");
  88.  
  89.     document.writeln(document.all.banner.style.left);
  90.  
  91.     document.writeln("</DD>");
  92.  
  93.     document.writeln("<DD><B>top:</B> ");
  94.  
  95.     document.writeln(document.all.banner.style.top);
  96.  
  97.     document.writeln("</DD>");
  98.  
  99.  
  100.  
  101.     document.writeln("<DT><B>IMG</B></DT>");
  102.  
  103.     document.writeln("<DD><B>border:</B> ");
  104.  
  105.     document.writeln(document.all.arrow.style.border);
  106.  
  107.     document.writeln("</DD>");
  108.  
  109.  
  110.  
  111.   </SCRIPT>
  112.  
  113.   </DL></BLOCKQUOTE>
  114.  
  115.  
  116.  
  117.   </BLOCKQUOTE>
  118.  
  119. </BODY>
  120.  
  121. </HTML>
  122.  
  123.